﻿<html>
	<head>
		<title>Dialog - jQuery LigerUI API</title>      
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
		<link href="../common.css" rel="stylesheet" type="text/css" />
		<script src="../core.js" type="text/javascript"></script> 
	</head>
	<body>
		<h2>ligerDialog</h2> 
         
        
                    <p> 
            弹出框
        </p>
                     
          
                <h3>示例</h3>
        <pre><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;"> 1</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">switch</span><span style="color: #000000;"> (type)
</span><span style="color: #008080;"> 2</span> <span style="color: #000000;">             {
</span><span style="color: #008080;"> 3</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">success</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;"> 4</span> <span style="color: #000000;">                     $.ligerDialog.success(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;"> 5</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 6</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">warn</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;"> 7</span> <span style="color: #000000;">                     $.ligerDialog.warn(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;"> 8</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 9</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">question</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">10</span> <span style="color: #000000;">                     $.ligerDialog.question(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">11</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">12</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">error</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">13</span> <span style="color: #000000;">                     $.ligerDialog.error(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">14</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">15</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">confirm</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">16</span> <span style="color: #000000;">                     $.ligerDialog.confirm(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (yes)
</span><span style="color: #008080;">17</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">18</span> <span style="color: #000000;">                         alert(yes);
</span><span style="color: #008080;">19</span> <span style="color: #000000;">                     });
</span><span style="color: #008080;">20</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">21</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">warning</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">22</span> <span style="color: #000000;">                     $.ligerDialog.warning(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (type)
</span><span style="color: #008080;">23</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">24</span> <span style="color: #000000;">                         alert(type);
</span><span style="color: #008080;">25</span> <span style="color: #000000;">                     });
</span><span style="color: #008080;">26</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">27</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">prompt</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">28</span> <span style="color: #000000;">                     $.ligerDialog.prompt(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (yes, value)
</span><span style="color: #008080;">29</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">30</span> <span style="color: #000000;">                         </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (yes) alert(value);
</span><span style="color: #008080;">31</span> <span style="color: #000000;">                     }); 
</span><span style="color: #008080;">32</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">33</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">prompt2</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">34</span> <span style="color: #000000;">                     $.ligerDialog.prompt(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">,</span><span style="color: #000000;">'</span><span style="color: #000000;">初始化值</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (yes, value)
</span><span style="color: #008080;">35</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">36</span> <span style="color: #000000;">                         </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (yes) alert(value);
</span><span style="color: #008080;">37</span> <span style="color: #000000;">                     });
</span><span style="color: #008080;">38</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">39</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">prompt3</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">40</span> <span style="color: #000000;">                     $.ligerDialog.prompt(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">true</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (yes, value)
</span><span style="color: #008080;">41</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">42</span> <span style="color: #000000;">                         </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (yes) alert(value);
</span><span style="color: #008080;">43</span> <span style="color: #000000;">                     });
</span><span style="color: #008080;">44</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">45</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">prompt4</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">46</span> <span style="color: #000000;">                     $.ligerDialog.prompt(</span><span style="color: #000000;">'</span><span style="color: #000000;">提示内容</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #000000;">'</span><span style="color: #000000;">初始化多选框值</span><span style="color: #000000;">'</span><span style="color: #000000;">, </span><span style="color: #0000FF;">true</span><span style="color: #000000;">, </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (yes, value)
</span><span style="color: #008080;">47</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">48</span> <span style="color: #000000;">                         </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (yes) alert(value);
</span><span style="color: #008080;">49</span> <span style="color: #000000;">                     });
</span><span style="color: #008080;">50</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">51</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">waitting</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">52</span> <span style="color: #000000;">                     $.ligerDialog.waitting(</span><span style="color: #000000;">'</span><span style="color: #000000;">正在保存中,请稍候...</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">53</span> <span style="color: #000000;">                     setTimeout(</span><span style="color: #0000FF;">function</span><span style="color: #000000;"> ()
</span><span style="color: #008080;">54</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">55</span> <span style="color: #000000;">                         $.ligerDialog.closeWaitting();
</span><span style="color: #008080;">56</span> <span style="color: #000000;">                     }, </span><span style="color: #000000;">2000</span><span style="color: #000000;">);
</span><span style="color: #008080;">57</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">58</span> <span style="color: #000000;">                 </span><span style="color: #0000FF;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">waitting2</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">:
</span><span style="color: #008080;">59</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">var</span><span style="color: #000000;"> manager </span><span style="color: #000000;">=</span><span style="color: #000000;"> $.ligerDialog.waitting(</span><span style="color: #000000;">'</span><span style="color: #000000;">正在保存中2,请稍候...</span><span style="color: #000000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">60</span> <span style="color: #000000;">                     setTimeout(</span><span style="color: #0000FF;">function</span><span style="color: #000000;"> ()
</span><span style="color: #008080;">61</span> <span style="color: #000000;">                     {
</span><span style="color: #008080;">62</span> <span style="color: #000000;">                         manager.close();
</span><span style="color: #008080;">63</span> <span style="color: #000000;">                     }, </span><span style="color: #000000;">1000</span><span style="color: #000000;">);
</span><span style="color: #008080;">64</span> <span style="color: #000000;">                     </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
</span><span style="color: #008080;">65</span> <span style="color: #000000;">             }</span></div></pre>
        
        <h3>截图</h3>

        <p>
            <img src="../../uishow/ligerDialog.jpg" />
        </p>  
        

		        <h3>静态方法</h3> 
        <table class="apitable" cellpadding="0" cellspacing="0">
			 <thead>
            <tr> 
				<td>方法</td>
				<td>参数</td> 
				<td>描述</td> 
			</tr>
            </thead>   
            <tbody>
            			    <tr> 
                    <td>
                                        $.ligerDialog.open(options)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        打开一个自定义对话框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.close()
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        关闭对话框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.show(options)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        显示或者打开一个对话框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.hide()
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        隐藏所有的对话框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.tip(options)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        打开一个提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.alert(content, title, type, callback)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        &nbsp;
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.confirm(content, title, callback)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        确认框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.warning(content, title, callback)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        等待提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.waitting(title)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        等待提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.closeWaitting()
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        关闭等待提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.success(content, title, onBtnClick)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        成功提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.error(content, title, onBtnClick)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        失败提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.warn(content, title, onBtnClick)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        警告提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.question(content, title, onBtnClick)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        问题提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        $.ligerDialog.prompt(title, value, multi, callback)
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        输入提示框
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        &nbsp;
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        &nbsp;
                    				    </td>  
			    </tr>
		    			    <tr> 
                    <td>
                                        &nbsp;
                    				    </td> 
                    <td>
                                        &nbsp;
                    				    </td> 
				    <td>
                                        &nbsp;
                    				    </td>  
			    </tr>
		                </tbody>
		    </table>
        	</body>
</html>